<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/elec/elecGun.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>设备管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>充电枪详情</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">充电枪详情</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="addElecGun">
                        <input id="elecGunId" name="elecGunId" type="hidden" value="${elecGun.elecGunId}">
                        <%--          充电枪       --%>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="gunNo" name="gunNo"  readonly
                                       value="${elecGun.gunNo}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪顺序号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="gunNum" name="gunNum"  readonly
                                       value="${elecGun.gunNum}">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">使用状态</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="status" name="status"  readonly>
                                    <option value="0"
                                            <c:if test="${elecGun.status == 0}">selected</c:if>  >空闲
                                    </option>
                                    <option value="1"
                                            <c:if test="${elecGun.status == 1}">selected</c:if> >使用中
                                    </option>
                                    <option value="2"
                                            <c:if test="${elecGun.status == 2}">selected</c:if>  >插抢中
                                    </option>
                                </select>
                            </div>
                        </div>
                        <%--<div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪型号：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="gunType" id="gunType"  readonly>
                                    <option value="1"
                                            <c:if test="${elecGun.gunType eq '1'}">selected</c:if>   >家用插座（模式2)
                                    </option>
                                    <option value="2"
                                            <c:if test="${elecGun.gunType eq '2'}">selected</c:if>  >交流接口插座（模式3, 连接方式B)
                                    </option>
                                    <option value="3"
                                            <c:if test="${elecGun.gunType eq '3'}">selected</c:if>  >交流接口插头（带枪线，模式3,
                                        连接方式C)
                                    </option>
                                    <option value="4"
                                            <c:if test="${elecGun.gunType eq '4'}">selected</c:if>  >直流接口枪头（带枪线，模式4)
                                    </option>
                                    <option value="5"
                                            <c:if test="${elecGun.gunType eq '5'}">selected</c:if> >无线充电座
                                    </option>
                                    <option value="6"
                                            <c:if test="${elecGun.gunType eq '6'}">selected</c:if> >其他
                                    </option>
                                </select>
                            </div>
                        </div>--%>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪型号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="nationalStandard" name="nationalStandard" readonly
                                       value="${elecGun.nationalStandard}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right"> 输出电压范围(V)</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="voltageLowerLimits" name="voltageLowerLimits" readonly
                                       value="${elecGun.voltageLowerLimits}">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">输出最大电流(A)</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="voltageUpperLimits" name="voltageUpperLimits" readonly
                                       value="${elecGun.voltageUpperLimits}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">生产厂商</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="hlhtManufacturerName" name="hlhtManufacturerName" readonly
                                       value="${elecGun.hlhtManufacturerName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right"> 出厂编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="hlhtManufacturerId" name="hlhtManufacturerId" readonly
                                       value="${elecGun.hlhtManufacturerId}">
                            </div>
                        </div>
                        <%--            充电桩         --%>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">所属充电桩</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="pileNo" name="pileNo"
                                       value="${elecPile.pileNo}" readonly>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">桩体短号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="pileSort" name="pileSort" readonly
                                       value="${elecPile.pileSort}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">运营状态</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="operateStatus" name="operateStatus" readonly>
                                    <option value="0"
                                            <c:if test="${elecPile.operateStatus eq '0'}">selected</c:if>   >未上线
                                    </option>
                                    <option value="1"
                                            <c:if test="${elecPile.operateStatus eq '1'}">selected</c:if>   >上线
                                    </option>
                                    <option value="2"
                                            <c:if test="${elecPile.operateStatus eq '2'}">selected</c:if>   >下线
                                    </option>
                                    <option value="3"
                                            <c:if test="${elecPile.pileType == 3}">selected</c:if>   >故障
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">设备类型</label>
                            <div class="col-sm-8">
                                <select class="form-control"  name="pileType" id="pileType" disabled>
                                    <option value="7"
                                            <c:if test="${elecPile.pileType == 7}">selected</c:if>   >快充
                                    </option>
                                    <option value="8"
                                            <c:if test="${elecPile.pileType == 8}">selected</c:if>   >慢充
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">电桩型号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="equipmentModel" name="equipmentModel" readonly
                                       value="${elecPile.equipmentModel}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right"> 额定输出功率</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="power" name="power" readonly
                                       value="${elecPile.power}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">生产厂商</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" readonly
                                       value="${elecPile.hlhtManufacturerName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">出厂编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  readonly
                                       value="${elecPile.hlhtManufacturerId}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">生产日期</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="productionDate" name="productionDate" readonly
                                       value="${elecPile.productionDate}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">备注说明</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="remark" name="remark" readonly
                                       value="${elecPile.remark}">
                            </div>
                        </div>
                        <%--           充电站          --%>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">所属站点</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="stationName" name="stationName" readonly
                                       value="${elecStation.stationName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">站点类型</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="bizType" id="bizType" readonly>
                                    <option value="0"
                                            <c:if test="${elecStation.bizType eq '0'}">selected</c:if> >自营
                                    </option>
                                    <option value="1"
                                            <c:if test="${elecStation.bizType eq '1'}">selected</c:if> >加盟
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">省-市-区</label>
                            <div class="col-sm-2">
                                <select name="provinceId" id="provinceId" readonly
                                        class="form-control chosen-select"
                                        style="width: 100%" onchange="station.getCity()">
                                    <option value="" selected="selected">--请选择--</option>
                                    <c:forEach items="${provinces}" var="province">
                                        <option value="${province.provinceId}"
                                                <c:if test="${province.provinceId eq elecStation.provinceId}">selected</c:if>  >${province.provinceName}</option>
                                    </c:forEach>
                                </select>
                            </div>

                            <div class="col-sm-2">
                                <select name="cityId" id="cityId" readonly
                                        class="form-control chosen-select"
                                        style="width: 100%" onchange="station.getArea()">
                                    <option value="${elecStation.cityId}"
                                            selected="selected">${elecStation.cityName}</option>
                                </select>
                            </div>

                            <div class="col-sm-2">
                                <select id="areaId" name="areaId" class="form-control" placeholder="市区" readonly>
                                    <option value="${elecStation.areaId}"
                                            selected="selected">${elecStation.areaName}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">地址详情</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="address" name="address" readonly
                                       value="${elecStation.address}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">站点当前状态</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="stationStaus" name="stationStaus" readonly>
                                    <option value="0" ${elecStation.stationStaus=="0"?"selected":""}>无</option>
                                    <option value="1" ${elecStation.stationStaus=="1"?"selected":""}>正常</option>
                                    <option value="2" ${elecStation.stationStaus=="2"?"selected":""}>整改</option>
                                    <option value="3" ${elecStation.stationStaus=="3"?"selected":""}>拆除</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">投运时间</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="operateStartTime" name="operateStartTime"
                                       value-format="yyyy-MM-dd HH:mm:ss" value="${elecStation.operateStartDate}" readonly>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">价格(元/度)</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" readonly
                                       value="${elecStation.elecPrice}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">站点备注</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="stationRemark" name="stationRemark" readonly
                                       value="${elecStation.stationRemark}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">所属加盟商：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" readonly
                                       value="${operator.operatorName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">加盟商类型：</label>
                            <%--<div class="col-sm-8">
                                <select class="form-control" id="operatorType" name="operatorType" readonly>
                                    <option value="0" ${operator.operatorType=="0"?"selected":""}>分销商</option>
                                    <option value="1" ${operator.operatorType=="1"?"selected":""}>场地方</option>
                                </select>
                            </div>--%>
                            <div class="col-sm-4">
                                <select id="operatorType" name="operatorType" class="form-control" placeholder="" disabled>
                                    <option value="" selected="selected">请选择</option>
                                    <option value="0" <c:if test="${operator.operatorType == '0'}">selected</c:if>>自营</option>
                                    <option value="1" <c:if test="${operator.operatorType == '1'}">selected</c:if>>托管</option>
                                    <option value="2" <c:if test="${operator.operatorType == '2'}">selected</c:if>>加盟</option>
                                    <option value="3" <c:if test="${operator.operatorType == '3'}">selected</c:if>>接口</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">负责人：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" readonly
                                       value="${operator.contactName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">电话：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" readonly
                                       value="${operator.phone}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">加盟日期：</label>
                            <div class="col-sm-8">
                                <input class="form-control"
                                       value="<fmt:formatDate value="${operator.createdTime}" pattern="yyyy-MM-dd HH:mm:ss" />" readonly>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    addElecGun.init();
</script>
</body>
</html>
